from modules.storage.file_store import FileStore


def is_duplicate(venue_name: str, seen_names: set) -> bool:
    return venue_name in seen_names


def is_complete(venue: dict, required_keys: list) -> bool:
    return all(key in venue for key in required_keys)


def save_to_csv(venues: list, filename: str):
    if not venues:
        print("No venues to save.")
        return

    # 使用FileStore的CSV保存方法
    store = FileStore(filename)
    store.write(venues)
    print(f"Saved {len(venues)} venues via FileStore to '{filename}'.")
